﻿using System;
using System.Collections.Generic;
using System.Text;
using Zove.Runtime;

namespace Zove.Runtime
{
    public class SolvedFactor
    {
        public IInferencingStrategy Strategy
        {
            get;
            set;
        }

        public RuntimeFactor Factor
        {
            get;
            set;
        }

        public RuntimeRule Rule
        {
            get;
            set;
        }

        /// <summary>
        /// Evaluate
        /// </summary>
        public double Evaluate()
        {
            this.Factor.Value = this.Strategy.Evaluate(this);
            //this.Factor.Status = RuntimeFactorStatus.Evaluated;

            return this.Factor.Value;
        }
    }
}
